#ifndef __CONF_H__
#define __CONF_H__

#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>

#include "type.h"

#pragma pack(1)

#define KEY_ETH "ethername"
#define KEY_WALL_POLL_NODE_IP "wall_poll_node_ip"

typedef struct _CONF
{
    uint16 ui_start;
    uint16 ui_port_type;
    uint16 port;
    uint32 timeout;
    uint32 workernum;
    uint32 connnum;
    uint32 data_buf_num_2kb;
    uint32 data_buf_num_1kb;
    uint32 data_buf_num_512b;
    uint32 data_buf_num_256b;
    uint32 data_buf_num_128b;
    uint32 data_buf_num_64b;
    uint32 data_buf_num_32b;
    uint32 usernum;
    uint32 filenum;
    sint8 pg_serv_addr[32];
    sint8 pg_bouncer_listen_port[16];
    sint8 pg_db_name[16];
    sint8 db_user_name[16];
    sint8 db_password[16];
    uint32 watchdog_time;
    sint8  redis_ip[32];
    uint32 redis_port;
	sint8  logsvr_ip[32];
	uint32 logsvr_port;
	uint32 log_level;
} CONF;
#pragma pack()

sint8* read_file(sint8 *filename);

extern CONF* conf;
extern sint8 base_path[];


#endif    //__CONF_H__
